<?php
class Application_Form_Login extends Zend_Form
{ 
    public function init()
    {
        $this->setName('login');
        $user = new Zend_Form_Element_Text ('usuario');
        $user->setLabel('Usuario:');
        $user->setRequired(true); 
        $user->setAttrib('maxlength','12');
        $user->setErrorMessages(array('messages' => 'nombre de usuario o pasword incorrectos '));
        
        $pass = new Zend_Form_Element_Password ('password');
        $pass->setLabel('Password:');
        $pass->setRequired(true);
        $pass->setAttrib('maxlength','12');
        $pass->setErrorMessages(array('messages' => 'nombre de usuario o pasword incorrectos'));
        
        $submit = new Zend_Form_Element_Submit('bEntrar');
        $submit->setLabel('Ingresar:');
        
        $this->addElements(array($user, $pass, $submit));
        $this->setMethod('post');
        $this->setAction(Zend_Controller_Front::getInstance()->getBaseUrl().'/usuarios/login');
    }
 
}